
<!DOCTYPE HTML>

<html>

<head>
	<meta charset="utf-8">
	<title>前端艺术</title>
	<meta name="author" content="Nicholas">

	
	<meta name="description" content="Sep 12th, 2013 web Javascript:继承和原型链 JavaScript：继承和原型链（译） 原文：Inheritance and the prototype chain 译者：youngsterxyf 对于具备基于类的编程语言（如Java或C++）经验的程序员来说， &hellip;">
	

  <!-- http://t.co/dKP3o1e -->
  <meta name="HandheldFriendly" content="True">
  <meta name="MobileOptimized" content="320">
  <meta name="viewport" content="width=device-width, initial-scale=1">

	<link href="/atom.xml" rel="alternate" title="前端艺术" type="application/atom+xml">
	
	<link rel="canonical" href="http://xiebaochun.github.io/blog/page/4/">
	<link href="/favicon.png" rel="shortcut icon">
	<link href="/stylesheets/screen.css" media="screen, projection" rel="stylesheet" type="text/css">
	<link href="/stylesheets/font-awesome.min.css" media="screen, projection" rel="stylesheet" type="text/css">
	<!--[if lt IE 9]><script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script><![endif]-->
	<link href='http://fonts.googleapis.com/css?family=Open+Sans:400italic,400,700' rel='stylesheet' type='text/css'>
	<script src="//ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>
	<!--Fonts from Google"s Web font directory at http://google.com/webfonts -->
<link href="http://fonts.googleapis.com/css?family=PT+Serif:regular,italic,bold,bolditalic" rel="stylesheet" type="text/css">
<link href="http://fonts.googleapis.com/css?family=PT+Sans:regular,italic,bold,bolditalic" rel="stylesheet" type="text/css">

</head>


<body>
	<div class="container">
		<div class="left-col">
			<div class="intrude-less">
			<header id="header" class="inner"><div class="profilepic">
<!--the weather pugin-->
    <script defer src="http://julying.com/lab/weather/v3/jquery.weather.build.min.js?parentbox=body&moveArea=all&zIndex=1&move=1&drag=1&autoDrop=1&styleSize=big&style=_random&area=client&city=%E5%8C%97%E4%BA%AC"></script>
	<script src="/javascripts/md5.js"></script>
	<script type="text/javascript">
		$(function(){
			$('.profilepic').append("<img src='https://si0.twimg.com/profile_images/378800000316979686/061b0d73fe1b9cc3a643a68bcb077161.jpeg' alt='Profile Picture' style='width: 160px;' />");
		});
	</script>
</div>
<hgroup>
  <h1><a href="/">前端艺术</a></h1>
  
    <h2>one blog for games.</h2>
  
</hgroup>

<nav id="main-nav"><ul class="main-navigation">
  <li><a href="/">Home</a></li>
  <li><a href="/blog/archives">Archives</a></li>
  <li><a href="http://www.juerry.com/index.html">my lab</a></li>
</ul>


<section class="aboutme">
  <p>
    专注于移动开发
  </p>
</section>
</nav>
<nav id="sub-nav">
	<div class="social">
		
		
		
		<a class="twitter" href="http://twitter.com/xiebaochun" title="Twitter">Twitter</a>
		
		
		<a class="github" href="https://github.com/xiebaochun" title="GitHub">GitHub</a>
		
		
		
		
		
		
		
		
		<a class="rss" href="/atom.xml" title="RSS">RSS</a>
		
	</div>
</nav>
<section>
  <h1>Categories</h1>
    <ul id="category-list"><li><a href='/blog/categories/ios/'>ios (2)</a></li><li><a href='/blog/categories/other/'>other (14)</a></li><li><a href='/blog/categories/web/'>web (23)</a></li></ul>
</section>

</header>				
			</div>
		</div>	
		<div class="mid-col">
			
				
			
			<div class="mid-col-container">
				<div id="content" class="inner">
<div itemscope itemtype="http://schema.org/Blog">


    <article class="post" itemprop="blogPost" itemscope itemtype="http://schema.org/BlogPosting">
	<div class="meta">
		<div class="date">








  


<time datetime="2013-09-12T16:20:00+08:00" data-updated="true" itemprop="datePublished">Sep 12<span>th</span>, 2013</time></div>
		<div class="tags">


	<a class='category' href='/blog/categories/web/'>web</a>


</div>
		
	</div>
	<h1 class="title" itemprop="name"><a href="/blog/2013/09/12/inheritance-and-the-prototype-chain-of-javascript/" itemprop="url">Javascript:继承和原型链</a></h1>
	<div class="entry-content" itemprop="articleBody">
		<h3 id="javascript">JavaScript：继承和原型链（译）</h3>

<p>原文：<a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Inheritance_and_the_prototype_chain?redirectlocale=en-US&amp;redirectslug=JavaScript%2FGuide%2FInheritance_and_the_prototype_chain">Inheritance and the prototype chain</a></p>

<p>译者：<a href="https://github.com/youngsterxyf">youngsterxyf</a></p>

<p>对于具备基于类的编程语言（如Java或C++）经验的程序员来说，JavaScript有点混乱，因为它是一种动态语言，并且不提供<code>class</code>的实现（虽然关键字<code>class</code>是保留的，不可用作变量名）。</p>

<p>说到继承，JavaScript只有一种结构：对象。每个对象都有一个内部链接指向另一个对象，这个对象称为原型 (prototype)。那个原型对象也有自己的原型，如此直到某个对象以<code>null</code>作为其原型。<code>null</code>，根据定义，没有原型，作为这种<strong>原型链</strong>的最后一环而存在。

		
		<a href="/blog/2013/09/12/inheritance-and-the-prototype-chain-of-javascript/" class="more-link">继续阅读&rarr;</a>
	</div>

</article>


    <article class="post" itemprop="blogPost" itemscope itemtype="http://schema.org/BlogPosting">
	<div class="meta">
		<div class="date">








  


<time datetime="2013-09-11T17:27:00+08:00" data-updated="true" itemprop="datePublished">Sep 11<span>th</span>, 2013</time></div>
		<div class="tags">


	<a class='category' href='/blog/categories/web/'>web</a>


</div>
		
	</div>
	<h1 class="title" itemprop="name"><a href="/blog/2013/09/11/web-design-the-job/" itemprop="url">网页设计-关于工作</a></h1>
	<div class="entry-content" itemprop="articleBody">
		<h3 id="section">在机构里的工作</h3>

<p>我是在一个小代理商里开始从事web设计的。在1997年的时候，web刚开始起步，我们利用这个新鲜媒体来出售客户端。像我一样，很多的设计师自然而然地开始为代理商工作。这些代理商给我们这些设计师们提供了很好的发展平台，并给予很高的薪酬。你

		
		<a href="/blog/2013/09/11/web-design-the-job/" class="more-link">继续阅读&rarr;</a>
	</div>

</article>


    <article class="post" itemprop="blogPost" itemscope itemtype="http://schema.org/BlogPosting">
	<div class="meta">
		<div class="date">








  


<time datetime="2013-09-10T17:20:00+08:00" data-updated="true" itemprop="datePublished">Sep 10<span>th</span>, 2013</time></div>
		<div class="tags">


	<a class='category' href='/blog/categories/web/'>web</a>


</div>
		
	</div>
	<h1 class="title" itemprop="name"><a href="/blog/2013/09/10/the-html5/" itemprop="url">一个HTML5+Easel.js游戏的例子</a></h1>
	<div class="entry-content" itemprop="articleBody">
		<p>这是一个使用easeljs框架写的一个html5 RPG游戏,游戏很简单，主要是提供一个游戏的模板。下面是全部代码：

		
		<a href="/blog/2013/09/10/the-html5/" class="more-link">继续阅读&rarr;</a>
	</div>

</article>


    <article class="post" itemprop="blogPost" itemscope itemtype="http://schema.org/BlogPosting">
	<div class="meta">
		<div class="date">








  


<time datetime="2013-09-09T16:10:00+08:00" data-updated="true" itemprop="datePublished">Sep 9<span>th</span>, 2013</time></div>
		<div class="tags">


	<a class='category' href='/blog/categories/web/'>web</a>


</div>
		
	</div>
	<h1 class="title" itemprop="name"><a href="/blog/2013/09/09/design-for-the-web-getting-started/" itemprop="url">网页设计——简介</a></h1>
	<div class="entry-content" itemprop="articleBody">
		<p>网页设计不同于其他任何类型的媒介设计。它所需要的必备技能，有时会让你感到吃惊。而需要丰富的实战经验，这是毫无疑问的。网页设计吸引着各个领域的设计师们，从工程师设计到建筑设计，从产品设计到平面设计。本章将会简要介绍一下当前设计行业的概况，还有网页设计在设计领域中扮演的角色。

		
		<a href="/blog/2013/09/09/design-for-the-web-getting-started/" class="more-link">继续阅读&rarr;</a>
	</div>

</article>


    <article class="post" itemprop="blogPost" itemscope itemtype="http://schema.org/BlogPosting">
	<div class="meta">
		<div class="date">








  


<time datetime="2013-09-05T17:38:00+08:00" data-updated="true" itemprop="datePublished">Sep 5<span>th</span>, 2013</time></div>
		<div class="tags">


	<a class='category' href='/blog/categories/web/'>web</a>


</div>
		
	</div>
	<h1 class="title" itemprop="name"><a href="/blog/2013/09/05/something-in-octopress-blog/" itemprop="url">关于octopress建立博客的若干问题</a></h1>
	<div class="entry-content" itemprop="articleBody">
		<h4 id="octopressruby">最近在搞octopress的博客真是是快要崩溃了，对于不懂ruby的我来说确实遇到了很多的问题</h4>


		
		<a href="/blog/2013/09/05/something-in-octopress-blog/" class="more-link">继续阅读&rarr;</a>
	</div>

</article>


    <article class="post" itemprop="blogPost" itemscope itemtype="http://schema.org/BlogPosting">
	<div class="meta">
		<div class="date">








  


<time datetime="2013-09-05T17:32:00+08:00" data-updated="true" itemprop="datePublished">Sep 5<span>th</span>, 2013</time></div>
		<div class="tags">


	<a class='category' href='/blog/categories/other/'>other</a>


</div>
		
	</div>
	<h1 class="title" itemprop="name"><a href="/blog/2013/09/05/wellcome-to-my-blog/" itemprop="url">欢迎来到我的博客</a></h1>
	<div class="entry-content" itemprop="articleBody">
		<h6 id="section">这是一个公式的测试</h6>

<script type="math/tex; mode=display">% <![CDATA[

 \begin{align*}
   & \phi(x,y) = \phi \left(\sum_{i=1}^n x_ie_i, \sum_{j=1}^n y_je_j \right)
   = \sum_{i=1}^n \sum_{j=1}^n x_i y_j \phi(e_i, e_j) = \\
   & (x_1, \ldots, x_n) \left( \begin{array}{ccc}
   \phi(e_1, e_1) & \cdots & \phi(e_1, e_n) \\
   \vdots & \ddots & \vdots \\
   \phi(e_n, e_1) & \cdots & \phi(e_n, e_n)
 \end{array} \right)
   \left( \begin{array}{c}
   y_1 \\
   \vdots \\
   y_n
 \end{array} \right)
 \end{align*}
    %]]></script>

		
		
	</div>

</article>


    <article class="post" itemprop="blogPost" itemscope itemtype="http://schema.org/BlogPosting">
	<div class="meta">
		<div class="date">








  


<time datetime="2013-09-05T17:27:00+08:00" data-updated="true" itemprop="datePublished">Sep 5<span>th</span>, 2013</time></div>
		<div class="tags">


	<a class='category' href='/blog/categories/other/'>other</a>


</div>
		
	</div>
	<h1 class="title" itemprop="name"><a href="/blog/2013/09/05/my-name-is-geink/" itemprop="url">My Name Is Geink</a></h1>
	<div class="entry-content" itemprop="articleBody">
		

		
		
	</div>

</article>


    <article class="post" itemprop="blogPost" itemscope itemtype="http://schema.org/BlogPosting">
	<div class="meta">
		<div class="date">








  


<time datetime="2013-09-05T17:22:00+08:00" data-updated="true" itemprop="datePublished">Sep 5<span>th</span>, 2013</time></div>
		<div class="tags">


	<a class='category' href='/blog/categories/other/'>other</a>


</div>
		
	</div>
	<h1 class="title" itemprop="name"><a href="/blog/2013/09/05/who-an-i/" itemprop="url">Who an I ?</a></h1>
	<div class="entry-content" itemprop="articleBody">
		

		
		
	</div>

</article>


    <article class="post" itemprop="blogPost" itemscope itemtype="http://schema.org/BlogPosting">
	<div class="meta">
		<div class="date">








  


<time datetime="2013-09-05T17:20:00+08:00" data-updated="true" itemprop="datePublished">Sep 5<span>th</span>, 2013</time></div>
		<div class="tags">


	<a class='category' href='/blog/categories/other/'>other</a>


</div>
		
	</div>
	<h1 class="title" itemprop="name"><a href="/blog/2013/09/05/sdjfnsj/" itemprop="url">Sdjfnsj</a></h1>
	<div class="entry-content" itemprop="articleBody">
		

		
		
	</div>

</article>

</div>
<nav id="pagenavi">
    
        <a href="/blog/page/3/" class="prev">Prev</a>
    
    
    <div class="center"><a href="/blog/archives">Blog Archives</a></div>
</nav></div>
			</div>
			<footer id="footer" class="inner"><p>
  Copyright &copy; 2014 - Nicholas -
  <span class="credit">Powered by <a href="http://octopress.org">Octopress</a></span>
</p>

Design credit: <a href="http://shashankmehta.in/archive/2012/greyshade.html">Shashank Mehta</a></footer>
			







  <script type="text/javascript">
    (function(){
      var twitterWidgets = document.createElement('script');
      twitterWidgets.type = 'text/javascript';
      twitterWidgets.async = true;
      twitterWidgets.src = '//platform.twitter.com/widgets.js';
      document.getElementsByTagName('head')[0].appendChild(twitterWidgets);
    })();
  </script>





		</div>
	</div>
</body>
</html>
